<template>
    <div class="apparatus-room-search-container">
        <el-form ref="queryFormRef" :model="queryParamsModel" :inline="true">
            

            <el-form-item prop="cityList" label="制式">
                <el-select
                    v-model="queryParamsModel.generationTypeList"
                    multiple
                    collapse-tags
                    clearable
                    placeholder="全部"
                    style="width: 180px"
                >
                    <el-option
                        v-for="item in generationTypeList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    />
                </el-select>
            </el-form-item>
            <el-form-item prop="cityList" label="厂家">
                <el-select
                    v-model="queryParamsModel.vendorList"
                    multiple
                    collapse-tags
                    clearable
                    placeholder="全部"
                    style="width: 180px"
                >
                    <el-option
                        v-for="item in vendorList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    />
                </el-select>
            </el-form-item>

            <el-form-item prop="cityList" label="板卡类型">
                <el-select
                    v-model="queryParamsModel.boardTypeList"
                    multiple
                    collapse-tags
                    clearable
                    placeholder="全部"
                    style="width: 180px"
                >
                    <el-option
                        v-for="item in boardTypeList"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                    />
                </el-select>
            </el-form-item>

            <!-- <el-form-item label="关键字" prop="keywords">
                <el-input
                    v-model="queryParamsRef.keyWord"
                    placeholder="Nodeb Id/Nodeb Name"
                    clearable
                    style="width: 200px"
                />
            </el-form-item> -->

            <el-form-item>
                <el-button type="primary" @click="queryTable"
                    ><ElSvgIcon
                        a-icon-name="el-icon-search"
                        :aSize="15"
                    />&nbsp;搜索</el-button
                >
                <el-button @click="resetQuery"
                    ><el-icon-refresh
                        style="width: 1em; height: 1em; margin-right: 3px"
                    />重置</el-button
                >
            </el-form-item>
        </el-form>
    </div>
</template>
<script setup lang="ts">
import { TypeBbuBoardStatusVoQueryI } from "@/api/current_status/bbu_board_status/bbu_board_status_types";

import { $bus } from "@/event_bus/event_bus_index";
import { NslUtil4Vue } from "@/utils/NslUtil4Vue";
import { labelInner } from "echarts/types/src/label/labelStyle.js";
import { ElForm } from "element-plus";
import { onMounted, PropType, ref, watchEffect } from "vue";

//todo:


const queryParamsModel = defineModel({
    type: Object as PropType<TypeBbuBoardStatusVoQueryI>,
    required: true,
});



const generationTypeList=[
    {
        value: "4G",
        label: "4G",
    },
    {
        value: "5G",
        label: "5G",
    },
]
const vendorList=[
    {
        value: "中兴",
        label: "中兴",
    },
    {
        value: "华为",
        label: "华为",
    },
    {
        value: "大唐",
        label: "大唐",
    },
]
const boardTypeList=[
    {
        value: "基带板",
        label: "基带板",
    },
    {
        value: "主控板",
        label: "主控板",
    },
    {
        value: "机框+风扇",
        label: "机框+风扇",
    },
    {
        value: "电源板",
        label: "电源板",
    },
]


const queryTable = () => {
    $bus.emit('bbu-return-board-table-query');
};
const resetQuery = () => {
    queryParamsModel.value.boardTypeList=undefined
    queryParamsModel.value.generationTypeList=undefined;
    queryParamsModel.value.vendorList=undefined
    $bus.emit('current-status-apparatus-room-table-query');
};
</script>
<style lang="scss" scoped></style>
